<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>promise</title>
</head>
<body>
	<script>
		new Promise((resolve,reject)=>{
			resolve('成功')
			reject('失败')
		}).then(res=>{
			console.log(res)
		}).catch(err=>{
			console.log(err)
		})
	</script>
</body>
</html>